# -*- coding:utf-8 -*-
# @Time : 2021/10/19 22:15
# @Author: tangn
# @File : yield_demo.py


def my_gen():
    yield 1
    yield 2
    yield 3
    return 4


gen = my_gen()
print(next(gen))
print(next(gen))
print(next(gen))
print(next(gen))
print(next(gen))
print(next(gen))
